# -*- coding: utf-8 -*-
"""
Created on 2016-10-22 16:24
@author : chen
"""
import json
import re

from scrapy import cmdline
import time


import sys

# reload(sys)
# sys.setdefaultencoding('utf8')

spidername = "job58Spider"  # zhaopinSpider job51Spider job58Spider

LOG_FILE_PATH = 'log/' + spidername + '/'
LOG_FILE_NAME = LOG_FILE_PATH + time.strftime("%Y-%m-%d-%H-%M", time.localtime()) + '.log'

# cmdline.execute(("scrapy crawl " + spidername + " -s LOG_FILE=" + LOG_FILE_NAME).split())
cmdline.execute(("scrapy crawl " + spidername).split())

